package com.spsy.order.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spsy.common.core.annotation.Excel;
import com.spsy.common.core.web.domain.BaseEntity;

/**
 * 订单名对象 order
 * 
 * @author ruoyi
 * @date 2025-05-06
 */
@Builder
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal paymentAmount;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal shippingFee;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /** 优惠券抵扣金额 */
    @Excel(name = "优惠券抵扣金额")
    private BigDecimal couponAmount;

    /** 支付方式(1:支付宝,2:微信,3:银行卡) */
    @Excel(name = "支付方式(1:支付宝,2:微信,3:银行卡)")
    private Integer paymentType;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /** 支付流水号 */
    @Excel(name = "支付流水号")
    private String paymentSerialNumber;

    /** 订单状态(0:待支付,1:已支付待发货,2:已发货,3:已完成,4:已取消,5:已退款) */
    @Excel(name = "订单状态(0:待支付,1:已支付待发货,2:已发货,3:已完成,4:已取消,5:已退款)")
    private Integer status;

    /** 收货地址ID */
    @Excel(name = "收货地址ID")
    private Long shippingAddressId;

    /** 物流公司 */
    @Excel(name = "物流公司")
    private String shippingName;

    /** 物流单号 */
    @Excel(name = "物流单号")
    private String shippingCode;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shippingTime;

    /** 收货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    public void setPaymentAmount(BigDecimal paymentAmount) 
    {
        this.paymentAmount = paymentAmount;
    }

    public BigDecimal getPaymentAmount() 
    {
        return paymentAmount;
    }

    public void setShippingFee(BigDecimal shippingFee) 
    {
        this.shippingFee = shippingFee;
    }

    public BigDecimal getShippingFee() 
    {
        return shippingFee;
    }

    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }

    public void setCouponAmount(BigDecimal couponAmount) 
    {
        this.couponAmount = couponAmount;
    }

    public BigDecimal getCouponAmount() 
    {
        return couponAmount;
    }

    public void setPaymentType(Integer paymentType) 
    {
        this.paymentType = paymentType;
    }

    public Integer getPaymentType() 
    {
        return paymentType;
    }

    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }

    public void setPaymentSerialNumber(String paymentSerialNumber) 
    {
        this.paymentSerialNumber = paymentSerialNumber;
    }

    public String getPaymentSerialNumber() 
    {
        return paymentSerialNumber;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setShippingAddressId(Long shippingAddressId) 
    {
        this.shippingAddressId = shippingAddressId;
    }

    public Long getShippingAddressId() 
    {
        return shippingAddressId;
    }

    public void setShippingName(String shippingName) 
    {
        this.shippingName = shippingName;
    }

    public String getShippingName() 
    {
        return shippingName;
    }

    public void setShippingCode(String shippingCode) 
    {
        this.shippingCode = shippingCode;
    }

    public String getShippingCode() 
    {
        return shippingCode;
    }

    public void setShippingTime(Date shippingTime) 
    {
        this.shippingTime = shippingTime;
    }

    public Date getShippingTime() 
    {
        return shippingTime;
    }

    public void setReceiveTime(Date receiveTime) 
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime() 
    {
        return receiveTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("userId", getUserId())
            .append("totalAmount", getTotalAmount())
            .append("paymentAmount", getPaymentAmount())
            .append("shippingFee", getShippingFee())
            .append("discountAmount", getDiscountAmount())
            .append("couponAmount", getCouponAmount())
            .append("paymentType", getPaymentType())
            .append("paymentTime", getPaymentTime())
            .append("paymentSerialNumber", getPaymentSerialNumber())
            .append("status", getStatus())
            .append("shippingAddressId", getShippingAddressId())
            .append("shippingName", getShippingName())
            .append("shippingCode", getShippingCode())
            .append("shippingTime", getShippingTime())
            .append("receiveTime", getReceiveTime())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
